<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateStaffTable extends Migration
{
    /**
     * Run the migrations.
     * 员工表
     * @return void
     */
    public function up()
    {
        Schema::create('staff', function (Blueprint $table) {
            $table->increments('id');
	        $table->integer('uid')->comment('用户uid')->nullable();
	        $table->string('avator')->comment('人员图像')->nullable();
	        $table->string('name','20')->comment('人员姓名')->nullable();
//	        $table->tinyInteger('type')->comment('人员类型')->nullable();
//	        $table->string('contract_number','50')->comment('6合同编号')->nullable();
            $table->string('phone','30')->comment('联系方式')->nullable();
	        $table->tinyInteger('department')->comment('配置部门')->nullable();
//	        $table->string('address','100')->comment('联系地址')->nullable();
	        $table->tinyInteger('station')->comment('配置岗位')->nullable();
//	        $table->string('card','50')->comment('银行卡号')->nullable();
//	        $table->string('opening_bank','50')->comment('开户行')->nullable();
//	        $table->integer('job')->comment('在职状态：1在职，2离职')->nullable()->default(1);
	        $table->integer('task_status')->comment('任务状态：1空闲，2等待排班，3任务中，4管理人员')->nullable()->default(1);
	        $table->integer('status')->comment('状态：0未创建，1已创建')->default(0)->nullable();
	        $table->integer('company_id')->comment('所属公司id')->nullable();
	        $table->softDeletes();
	        $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('staff');
    }
}
